September 8th, 2009 Published by: inchoo
Inchoo's Magento Posts
You're reading the 200th blog post edition of Inchoo's Magento e-book. It collects all of our blog posts on Magento. We want to thank everyone for staying with us so far and hope we will live to see 1000th blog post anniversary. :)
Inchoo is an ecommerce design and development company specialized in building Magento online stores.
Boost the speed of your Magento One of the drawbacks of Magento is currently its speed if default configuration is used. There are certain ways of making it run faster. The best one is to enable GZip compression by changing .htaccess file a little. You just need to uncomment part of the code. In my case, the speed increase was exactly 235%.
Add custom structural block / reference in Magento | Inchoo If you already performed some Magento research, you will know that it is built on a fully modular model that gives great scalability and flexibility for your store. While creating a theme, you are provided with many content blocks that you can place in structural blocks. If you are not sure what they are, please read Designer’s Guide to Magento first. Magento provides few structural blocks by default and many content Step 1: Name the structural block blocks. This article tells what needs to be in place to create new Open the file layout/page.xml in your active theme folder. structural block. Inside you will find lines like:
What are structural blocks?
Created using zinepal.com. Go online to create your own zines or read what others have already published. 1 September 8th, 2009 Published by: inchoo Let’s assume we wish the “newreference” block to be placed TRUNCATE `sales_order_entity_datetime`; below 2 columns, but above the footer. In this case, our TRUNCATE `sales_order_entity_decimal`; TRUNCATE `sales_order_entity_int`; updated file could look like this: TRUNCATE `sales_order_entity_text`; TRUNCATE `sales_order_entity_varchar`; TRUNCATE `sales_order_int`;
Created using zinepal.com. Go online to create your own zines or read what others have already published. 2 September 8th, 2009 Published by: inchoo ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1; ?> ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1; < ?php if (!empty($result)): ?> ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;
< ?php echo $item->name ?> | < ?php _e('Starting at') ?> $ < ?php echo floatval($item->price) ?> | -- Reset all ID counters
$entityIds = get_post_custom_values(get_option('connect2MAGE_CustomFieldName'));Let’s create a file called latest_news.phtml in app/design/frontend/default/[your_theme]/template/ $result = array(); callouts/latest_news.phtml Now we will create a PHP block that will display the list if(!empty($entityIds)) of articles from RSS feed. We will use Inchoo RSS for { $entityIds = $entityIds[0]; demonstration purposes. In your scenario, replace it with your $sql = "SELECT `e`.*, `_table_price`.`value` AS `price`, ownIFNULL(_table_visibility.value, valid RSS URL. _table_visibility_default.value) AS `visibility`, IFNULL(_table_status.value, _table_status_default.value) AS `status`, `_table_url_key`.`value` AS `url_key`, IFNULL(_table_name.value, _table_name_default.value) AS `name` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_entity_decimal` AS `_table_price` ON (_table_price.entity_id = e.entity_id) AND (_table_price.attribute_id='99') AND (_table_price.store_id=0) INNER JOIN `catalog_product_entity_int` AS `_table_visibility_default` ON (_table_visibility_default.entity_id = e.entity_id) AND (_table_visibility_default.attribute_id='526') AND _table_visibility_default.store_id=0 LEFT JOIN `catalog_product_entity_int` AS `_table_visibility` ON (_table_visibility.entity_id = e.entity_id) AND (_table_visibility.attribute_id='526') AND (_table_visibility.store_id='1') INNER JOIN `catalog_product_entity_int` AS `_table_status_default` ON (_table_status_default.entity_id = e.entity_id) AND (_table_status_default.attribute_id='273') AND _table_status_default.store_id=0 LEFT JOIN `catalog_product_entity_int` AS `_table_status` ON (_table_status.entity_id = e.entity_id) AND (_table_status.attribute_id='273') AND (_table_status.store_id='1') INNER JOIN `catalog_product_entity_varchar` AS `_table_url_key` ON (_table_url_key.entity_id = e.entity_id) AND (_table_url_key.attribute_id='481') AND (_table_url_key.store_id=0) INNER JOIN `catalog_product_entity_varchar` AS `_table_name_default` ON (_table_name_default.entity_id = e.entity_id) AND (_table_name_default.attribute_id='96') AND _table_name_default.store_id=0 LEFT JOIN `catalog_product_entity_varchar` AS `_table_name` ON (_table_name.entity_id = e.entity_id) AND (_table_name.attribute_id='96') AND (_table_name.store_id='1') WHERE (e.entity_id in (".$entityIds.")) AND (_table_price.value >= 0 and _table_price.value < = 999999999999) AND (IFNULL(_table_visibility.value, _table_visibility_default.value) in (2, 4)) AND (IFNULL(_table_status.value, _table_status_default.value) in (1)) AND (_table_url_key.value not in ('P1FHN3G0LRWGMYZ3')) AND (IFNULL(_table_name.value, _table_name_default.value) not in ('P1FHN3G0LRWGMYZ3'))"; $result = $MAGEDB->get_results($sql); var_dump($result); < ?php $channel = new Zend_Feed_Rss('http://feeds.feedburner.com/Inchoo'); ?> }
< ?php echo $this->__('Latest News') ?>
echo ' ';Created using zinepal.com. Go online to create your own zines or read what others have already published. 3 September 8th, 2009 Published by: inchoo
- • use the http://somestore.domain/catalogsearch/ < ?php foreach ($channel as $item): ?> partnumber as a link
- < ?php echo $item->title; ?> < ?php endforeach; ?> • show only custom_partnumber field on the search form
Some of you might say why not use the default and call it a day.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 4 September 8th, 2009 Published by: inchoo
Created using zinepal.com. Go online to create your own zines or read what others have already published. 5 September 8th, 2009 Published by: inchoo Mage::getSingleton(’catalog/session) on view.phtml file we Inchoo TV – Magento channel would retrieve an array with some useful data in it. Do not get confused with me mentioning the view.phmtl file, it’s just he file i like to use to test the code. Using Mage::getSingleton(’core/session) would retrieve us some more data. You get the picture. Test, test, test… What’s great about the whole thing is that naming in Magento is perfectly logical so most of the time you will probably find stuff you need Making use of Magento getSingleton in few minutes or so. method In one of my previous articles I showed you how to use Figuring out Magento object context getModel and getData methods in Magento. Although we One of the problems working under the hood of the Magento should not put those to methods at the same level, since I’d say CMS is determining the context of $this. If you are about the getModel is a bit more higher. Higher in sense, you first to do any advanced stuff with your template, besides layout use the geModel to create the instance of object then you use changes, you need to get familiar with Magento’s objects getData to retrieve the data from that instance. I have said it (classes). before, and I’m saying it again; Magento is a great peace of full OOP power of PHP. It’s architecture is something not yet Let’s have a look at the /app/design/frontend/default/ widely seen in CMS solutions. default/template/catalog/product/view.phtml file. If you open this file and execute var_dump($this) your browser will One of the architectural goodies of Magento is it’s Singleton return empty page after a short period of delay. By page I mean design pattern. In short, Singleton design pattern ensures a on the product view page; the one you see when you click on class has only one instance. Therefore one should provide a Magetno product. Experienced users will open PHP error log global point of access to that single instance of a class. and notice the error message caused by var_dump(). Error So why would you want to limit yourself to only one instance? message: Let’s say you have an application that utilizes database PHP Fatal error: Allowed memory size of 134217728 bytes connection. Why would you create multiple instance of the exhausted (tried to allocate 121374721 bytes) same database connection object? What if you had references I like using print_r() and var_dump(), mostly because so far to an object in multiple places in your application? Wouldn’t I had no positive experience using fancy debug or any other you like to avoid the overhead of creating a new instance of debugger with systems like Magento. that object for each reference? Then there is the case where you might want to pass the object’s state from one reference Why is PHP throwing errors then? If you google out the to another rather than always starting from an initial state. error PHP has thrown at you, you’ll see that PHP 5.2 has memory limit. Follow the link http://www.php.net/ Inside the Mage.php file of Magento system there is a manual/en/ini.core.php#ini.memory-limit to see how and getSingleton method (function if you prefer). Since it’s what exactly. footprint is rather small, I’ll copy paste the code for you to see it. Google search gave me some useful results trying to solve my problems. I found Krumo at http://krumo.sourceforge.net/. First, notice the word static. In PHP and in other OOP It’s a PHP debugging tool, replacement for print_r() and languages keyword static stands for something like “this can var_dump(). After setting up Krumo and running it on be called on non objects, directly from class”. Now let me show Magento it gave me exactly what I wanted. It gave me the you the footprint of the getModel method. object type of the dumped file; in this case it gave me object Do you notice the parameters inside the brackets? They are the type of $this. same for both of theme. Where am I getting with this? Well, If you’re using an IDE studio with code completion support I already showed you how to figure out the list of all of the like NuSphere PhpED, ZendStudio or NetBeans and you available parameters in one of my previous articles on my site. decide to do something like $this-> you won’t get any methods So all we need to do at this point is, play with those parameters listed. I haven’t yet seen the IDE that can perform this kind of using getSingleton() method and observe the results. smart logic and figure out the context of $this by it self. Most important thing you need to remember is that using What you can do is use the information obtained getSingleton you are calling already instantiated object. So if by krumo::dump($this). Performing krumo::dump($this) you get the empty array as a result, it means the object is on /app/design/frontend/default/default/template/catalog/ empty. Only the blueprint is there, but nothing is loaded in it. product/view.phtml file will return object type, We had the similar case using getModel(’catalog/product‘) Mage_Catalog_Block_Product_View. on some pages. If we done var_dump or print_r we could saw the return array was empty. Then we had to use the load Now if you do method to load some data into our newly instantiated object. Mage_Catalog_Block_Product_View:: What I’m trying to say, you need to play with it your IDE supporting code completion will give you to get the feeling. Some models will return data rich a drop down of all the available methods, let’s say objects some will return empty arrays. If we were to do canEmailToFriend(); Created using zinepal.com. Go online to create your own zines or read what others have already published. 6 September 8th, 2009 Published by: inchoo Mage_Catalog_Block_Product_View::canEmailToFriend(); What is “Best Value” filed? Now all you need to do is to replace When you go to Category page in Magento administration, you Mage_Catalog_Block_Product_View with $this like will see “Category Products” tab. From there, you will see the $this->canEmailToFriend(); list of products that are associated to this category. The last And you’re done. All of this may look like “why do I need this”. column in “Position”. That is how “Best Value” is determined. What you need it a smart IDE, one that can figure out the So, best value is not something that is dynamically calculated. context of $this by it self and call the methods accordingly. No You can tailor it to your likings. IDE currently does that, if I’m not missing on something. For now I see no better solution to retrieve the object context of $this across all those Magento files. If you need some help setting up Krumo with Magento you can read my other, somewhat detailed article on activecodeline.com. Hope this was useful for you. There are 2 comments
Get product review info (independent) of review page Here at Inchoo, we are working on a private project, that should see daylight any time soon. One of the requirements How to change default Sort Order we had is to show product review info on pages independent The file you need to look at is: /app/code/core/Mage/Catalog/ of product review page. Let’s say you wish to show review info Block/Product/List/Toolbar.php Since we’ll modify it, make a on home page for some of the products. After few weeks with copy to /app/code/local/Mage/Catalog/Block/Product/List/ working with Magento, one learns how to use the model stuff Toolbar.php directly from view files. Although this might not be the “right” way, it’s most definitely the fastest way (and I doubt most of One there, you will notice this code at the beginning of the file: your clients would prefer any other , especially if it’s some $this->_availableOrder = array( minor modification). 'position' => $this->__('Best Value'), 'name' => $this->__('Name'), 'price' => $this->__('Price') Simple random banner rotator in ); Magento using static blocks Default order takes the first value available. So, all you have to do is to either: This is my first post here and I’ll write about my first challenge regarding Magento since I came to work at Inchoo. • reorder it if you want to have a selection in the Toolbar or Please note that you are not restricted only to images, you • set only one value of choice if you will remove the could use text, video or whatever you want here, but I’ll focus selection from the toolbar on images with links as title says. In order to show this block, you should be familiar with I hope this will help somebody. Magento layouts. Since that is out of scope for this article, I’ll show you how to There are 4 comments put it below the content on cms pages. Couple of days ago we launched a new Magento project: Pebblehill Designs. This site utilizes Magento features and Changing default category sort order in turns it into a very powerful online catalog. You won’t notice the Shopping Cart or checkout process yet. Even without Magento those, this site shows exactly what Pebblehill has to offer: the Category toolbar has many options. By default is shows how most popular styles of custom upholstered furniture. many items are in the category, you can choose how many You can customize the furniture collection to express your products you wish to be displayed per page, you can change own unique style made with the highest quality materials and the listing type (List or Grid) and you may choose Sort Order. craftsmanship available. This “Sort Order” can be confusing. The default “Sort Order” is “Best Value”. What does it mean? How is the Best value Pebble Hill Designs’ parsons chairs are “American made” with determined? Can we change the default sort order? pride in Georgia. The quality speaks for itself. Your products are pre-assembled and ready for use when you receive them.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 7 September 8th, 2009 Published by: inchoo The love and the passion for beautiful home interiors translates into a high-quality product with a sophisticated style manufactured in the USA. Pebblehill Designs has assembled some of the most popular styles of custom upholstered furniture to offer to our customers. All styles are available in every fabric shown or you can provide your own fabric. You can customize the furniture collection to express your own unique style made with the highest quality materials and craftsmanship available.
Magento part of the site can be viewed if you click at Shop by Vehicle or Shop by Brand tabs from the main menu, but you will notice that some blocks seamlessly integrate between two solutions.
We developed this site as the Surgeworks team. The design was created by one of out top designers, Rafael Torales. We hope you enjoy it and feel free to post your comments. There are 6 comments
The Best Shopping Cart :: Trend analysis of osCommerce, Magento, ZenCart and CRE Loaded | Inchoo If you try to ask this question on some forum or newsgroup, you will surely get many replies. Everyone will present you his favorite. My first developed online store was created with TeraFlex PLUS, another Magento + standard osCommerce platform. After three or four projects, I started to work with CRE Loaded and used it frequently for Wordpress duo years. Although it was also an osCommerce fork, it had many After we launched TeraFlex Suspensions website few months advantages. I switched to Magento™ early this year and this ago, we created a new similar website for Teraflex PLUS. is my final choice. Although the name is similar, this is not the same company. Google™ Trends is a great tool to check some platforms The primary goal of this site is to help Jeep owners to upgrade popularity by comparing it to the competition. For my short their pets with parts and accessories for any type of adventure. analysis, I compared: The secondary goal is to create a Jeep enthusiast community in Utah, USA and surroundings. The site is powered by Wordpress and Magento combination. Magento is a superb Shopping Cart, but it lacks some of the CMS features. Wordpress is a superb CMS, but it fails to provide the needs for the eCommerce goals. The combination of these can create a very powerful website. We present you TeraFlex PLUS : Jeep Adventure Outfitters http://www.teraflexplus.com/
As you can see, osCommerce still remains the most popular eCommerce platform. However, you can notice that this
Created using zinepal.com. Go online to create your own zines or read what others have already published. 8 September 8th, 2009 Published by: inchoo popularity is fading. ZenCart is stable for the past two years. also tutorial about this on Magento Wiki. However i don’t like And my previous favorite, CRE Loaded (much better solution approach of duplicating and overriding Mage files from /local, than ZenCart in my opinion), is very low. Its popularity is also if it can be avoided, so i decided to write this small and useful fading even after their team put great effort into a new website example of adding or overriding default Magento settings and identity. through separated config files. And yes, Magento values can Now, take a look at blue line. My prediction is that sometime be overridden this way. Default layouts config can be found in Q1 2009, Magento will become most popular eCommerce in app/code/core/Mage/Cms/etc/config.xml along with used platform. It will surely kick osCommerce off the throne where xml code structure, so check it out. Thank you for listening! that fat duck was sitting for many years. It was about time. Drupal to Magento integration, simple First of all, let me inform you that this article is for those of link tweak with multilingual site you who are just starting with Magento. If you are a Magento expert, you will probably know this. Consider it just a reminder I see my coworker and friend Željko Prša made a nice little post for those who use Magento for first time. There are three on Adding a new language in Magento so I figure I’ll jump with common mistakes that most people do when they try to use a little Drupal to Magento integration trick concerning link Magento for first time, so read this article and you won’t be issues and multilingual sites. Here is a piece of code you can one of them.:) use in your Drupal templates to do the proper switching from Drupal site to Magento while keeping the selected language of • More experienced PHP developers will first read site. Note, this tweak assumes you have the desired language Magento Designers Guide before they try to style setup on both Drupal and Magento side. Magento, but others won’t and that’s the mistake This part goes to some of your Drupal theme file number two. Since Magento has great theme fallback system there is really no need to touch default theme. ... Although easiest way to make new theme for new global $language ; Magento is top copy the whole theme to a new folder, $lname = ($language->language == null) ? 'en' : $language->language; /* like "en", "de" */ $storeView = null; don’t do that. Copy only the files you will need: from / if($lname == 'de') { $storeView = '?___store=german&amp;amp;___from_store=english'; } design/frontend/default/default/ directory to /design/ ??> frontend/default/YOUR_NEW_THEME directory. Do the same thing with /skin/frontend/default/default/
Shop Congratulations, you have your own theme just like ... that. All that left is to apply new theme (System- Note the $storeView variable; GET ___store holds the value >Configuration->Design) and you are ready to do with of code name of the view you assigned in Magento, while GET your theme files whatever you want. ___from_store variable is used as helper to Magento inner workings. You can basically omit the other one. Your links to • Third mistake is modifying Magento core files. What files Shop from Drupal to Magento should now activate the proper are core ones? All what is in app/code/core folder. If you language, the same one you have active on Drupal side. have a need to modify some of those ones, you just need to duplicate that file in the same directory path to app/ There are 1 comments code/local. For example, if you need to modify the file app/code/core/Mage/Checkout/Block/Success.php Adding a new language in Magento copy it to As anything in Magento adding a new language is something that requires a certain procedure which we will explain right app/code/local/Mage/Checkout/Block/Success.php now and for future reference.
and leave the core file intact. This way your Magento will • 3. Now go to: Configuration -> Current Configuration be more bullet-proof to future updates. Scope (Select your language from the dropdown) and on the right side under “Locale options” choose the desired language. Custom CMS page layout in Magento | That’s it, now when you go to the frontend of the site, you’ll Inchoo notice a dropdown menu allowing the language switching. Last week I had a request to add new custom layout for few cms pages in one Magento shop. It’s really useful for different static pages of your shop. First create Access denied in Magento admin extension with only config file in it: app/code/local/Inchoo/ Some of you may encountered this problem. You install new AdditionalCmsPageLayouts/etc/config.xml Magento extension through downloader, try to access its Add your page/custom-static-page-1.phtml template file (or configuration settings and Magento throws “Access denied” page at you. Although you’re administrator of the system. copy some default one for start) and you’re done There is
Created using zinepal.com. Go online to create your own zines or read what others have already published. 9 September 8th, 2009 Published by: inchoo There are 5 comments
If you worked with osCommerce, Zen Cart, CRE Loaded or any similar eCommerce platform before, you might find Magento database structure quite confusing when you see it for the first time. I advise you not to rush too much figuring out what is what by glancing through database. Try to spend first few hours getting familiar with some background. For purposes of flexibility, the Magento database heavily utilizes an Entity- Attribute-Value (EAV) data model. As is often the case, the cost of flexibility is complexity. Is there something in Magento that is simple from developers point of view? Data manipulation in Magento is often more knowledge demanding than that typical use of traditional relational So what happened here? Magento just doesn’t have stored tables. Therefore, an understanding of EAV principles and privileges for this new extension. how they have been modeled into Magento it is HIGHLY First just try to logout and login again. If that doesn’t work, recommended before making changes to the Magento you need to reset admin privileges. data or the Magento schema (Wikipedia: Entity-attribute- value_model). Varien has simplified the identification of EAV Navigate to System->Permissions->Roles and click related tables with consistent naming conventions. Core EAV Administrators role. tables are prefixed with “EAV_”. Diagrams in this post contain a section labeled “EAV” which displays Magento’s core EAV tables and thier relationships to non-EAV tables.
Check your Role Resources settings just in case, Resource Access dropdown should be already set to All for Database diagrams and documents found in this post are administrators. intended to mirror the database schema as defined by Varien. Table relationships depicted in the diagrams represent only those relationships explicitly defined as Foreign Keys in the Magento database. Additional informal/undiagrammed table relationships may also exist, so when modifying the schema or directly manipulating data it is important to identify and evaluate possible changes to these tables as well (and the tables they relate to, and the tables they relate to…). The author of Database Diagram is Gordon Goodwin, IT Consultant. You can see his info in the PDF. There are 12 comments
Magento + .Net Framework, simple order preview app Without changing anything just click “Save Role” button, so For those of you who are into kinky stuff I made a simple, that Magento re-saves all permissions. more of a proof of concept, application that sits in Widnows You should be able to access your new extension now without taskbar and shows the order info in balloon popup. Took me problems. little more than half of hour to get this working. Almost forgot how great C# is
Created using zinepal.com. Go online to create your own zines or read what others have already published. 10 September 8th, 2009 Published by: inchoo Magento has this great feature, rss feed for orders. You can access it via link http://myshopsite/rss/order/new. It requires authentication, so you need to provide Magento user and pass to access this link. Idea I wanted to play around was how to get this info in my windows app. It’s really, really simple. Below is the screenshot of this little app for you to see what I’m talking about.
Technically, we create a simple products and after that a grouped products. When we edit the grouped product, we will associate simple products to it.It works very fine, but some of you might have issue if a simple product has custom options. If that’s the case, and if costum options are set as required And here is the application it self simpleorderpreview and full (default way), the simple product will not be associative to the source code (Visual Studio 2008 Express C#, entire solution grouped product. Let’s see what needs to be changed in that project) acmnewproducts. case. When you un-archive files from simpleorderpreview there is On Magento site, there is a nice tutorial how to create a only one thing you need to do prior to running .exe file. You grouped product. Please read it first to become familiar with need to open ACMNewProducts.exe.config and set username, the process. If you don’t have to assign simple products with password and url of your own Magento shop. That’s it. Now custom options to a grouped product, that tutorial will be you can run the app. enough. One click on Magento icon inside the taskbar executes show order process, while double cliking the icon closes the application. I will not go into the details in this post on how this works. Basicaly it’s simple XML parser. Most important part is the HTTP authentification, which you can see in code source code. Hope you find this usefull, something to play with. There are 4 comments
Associate simple product with custom Manually create Google Sitemap in options in grouped product in Magento | Magento | Inchoo Inchoo Most of you probably know this, but let’s define what the Does the title sound complicated? Grouped Products display sitemaps are. Sitemaps are a simple way for site creators to several products on one page. For example – if you’re selling give search engines the information about pages on their site chef’s knives and you have the same knife in four sizes, you can that are available for public. Basically, those are just 1 or more make a grouped product to display all four sizes. Customers XML files that lists URLs for a site along with additional meta can select the size(s) they want and add to cart from this page. informatio about each URL (like last update, how often it Another example would be a themed bedroom set – you can changes, its importance relevant to other pages). With this in create a grouped product and sell the sheets, comforter, and mind, search engines can be more clever while crawling the pillow cases all from the same page. site. Click here see how sitemap of this site looks like. You will hear the term Google Sitemap a lot, but XML Schema for the Sitemap protocol is not related only to Google at all. It can be used in many places, but the most important ones are Google Webmaster Tools and Yahoo! Site Explorer.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 11 September 8th, 2009 Published by: inchoo How do we create Google Sitemap in Magento? One of the things that caught my eye and made me wonder about the consequences is the Observer and override 1. Sitemap File Configuration functionality that probably most of the serious custom made Magento modules will utilize. Utilizing Observers enables you First we need to create sitemap file in Magento. This is to observe and execute some action inside the “customer work basically pointer to tell Magento where to create sitemap file flow” or even some admin stuff. Such functionality is heavily and how to name it. Log in to Magento Administration and go known is systems like WordPress and it’s called “hooks”. to: Besides hooking, another useful an very powerful feature Catalog -> Google Sitemap which is actually related more to the OOP concept itself is the Check to see if the sitemap file is already present. Lets overriding. Personally i find the combination of observers and assume we wish to create sitemap in the URL: http:// overrides to be the coolest and most powerful stuff in Magento www.yourstore.com/sitemap/sitemap.xml module development. To do it successfully, So where is the issue? As of time of this writing, the 1. FTP to the server latest Magento version is 1.3.1. Let’s look at the previous “major” release prior to that one, version 1.2.1.2. Here is 2. create sitemap folder a prepareForCart method signature from app/code/core/ 3. chmod the folder to 777 Mage/Catalog/Model/Product/Type/Abstract.php (line 239, Magento version 1.2.1.2): On some servers, previous steps will not be required, but it is Notice the difference? Although this might not look like better to create the file first so that Magento can edit it. “that big of a deal” suppose you had implemented override Let’s go to Magento administration now and click on “Add functionality like Sitemap” button. Just insert the default values. In the above code, we override the prepareForCart method to After this step, we just told Magento where to create sitemap to some custom stuff for us. This peace of code would work file. It is not yet created. perfectly fine in version 1.2.1.2, but when client decides to upgrade the shop to 1.3.1 or newer he would get the error like 2. Configure Sitemap To me, stuff like this is a serious downside towards building Sitemap can be configured from the interface System -> advanced modules. Changing core files and core functionality Configuration -> Catalog->Google Sitemap. If you are not sure can have serious impact on custom made modules each what does it all mean, check XML Tag definitions section from Magento upgrade. Therefore, one should keep an eye open “Sitemaps XML format” document. on what modules he will throw into the shop. Personally I 3. Create Sitemap Manually consider online stores very serious and have strong feelings about each store owner having somewhat of dedicated Looks like Magento folks were thinking that sitemap should developer that will be in charge even for stuff like adding new only be created by a cron job. Yes, it can be done that way modules. also. Be sure to read Wiki article How to Set Up a Cron Job to get familiar with it. If you are looking for manual creation, Just consider the financial loss for a store owner of any more quit your search for “Create Sitemap” button. You will not find serious web shop if he decides to download the and install it. But there is a workaround. You can enter manual URL to module himself just to realize that for incompatibility reasons execute sitemap creation: this new module made his shop fully nonfunctional. http://www.yourstore.com/index.php/admin/sitemap/ generate/sitemap_id/[ID of Sitemap from step 1] How to transfer large Magento database Of course, replace the content with square brackets with actual from live to development server and Sitemap ID. other way round There are 9 comments I have been involved in Magento development for almost a year now. God knows I had (and still have) my moments of Observer pitfalls of building serious pain with it . If you are in professional, everyday, PHP modules in Magento development that focuses mainly on Magento then your life probably isn’t all flowers and bees. Magento is extremely rich Unlike good old WordPress that “every kid in the block” knows eCommerce platform, but its main downside IMHO is its size how to create a plugin for, Magento is a whole new system. It and code complexity. If you download Magento via SVN, you requires extensive knowledge of OOP, ORM’s, MVC, and few will sound find out it has around 11 600 and more files. This other stuff. This is why not “every kid in the block” can write a is no small figure. Transferring that much of files over the module for Magento, and this is why I love it. However, unlike FTP can be a real night mare. Luckily we have SSH and tar WordPress, Drupal and other community driven systems out command to handle this really neat. there who keep in mind backward compatibility things with But what about database. Today I worked on database with Magento things are a bit different. more than 20 000 products in store and with extremely large number of categories. What seemed like easy database Created using zinepal.com. Go online to create your own zines or read what others have already published. 12 September 8th, 2009 Published by: inchoo transfer from live site to local developer machine to do a test Affiliates for all, are modules I consider loosely related to core. and fix on few issues tunerd out to be an issue for itself. They are in one or another way connected to Magento but they Without further delay, here is my favorite tool to handle all are self standing, independent, applications. database related work from now on: Navicat. Installation of Affiliate module is a trivial task. It mostly Among my favorite features is the Data transfer. Directly comes down to extracting downloaded archive file to a web moving one database to another among different MySQL accessible directory (to your server, hosting) and configuring servers works like a charm. I find yourself strangled among the config.inc file. (For security reasons, try renaming often database recommended action I suggests you test the the config.inc to config.inc.php, plus changing the /lib/ trial version of this tool. bootstrap.php on line 23 to include config.inc.php). After Here are some screenshots of Navicat Data transfer in Action. importing affiliates.sql into the database our installation is done. To configure Magento part, one needs to copy required files form /carts directory of Affiliate module and then (turn off Cache) go to System > Configuration and set the required options. After that you can go back to your Affiliate For All application, upload some banners and set their url links to point to your Magento shop. When you test banner the links (click on one of them to get you to Magento store, then Magento store url should have a little GET variable in url like ?ref=someNum). Now when you do the entire checkout process, order info gets recorded to Affiliate For All application. If you wish to play with Affiliate For All without installing it, you can check out the demo (just use “Admin” both for user and password). There are 2 comments
New Magento theme tutorial | Inchoo There are many new Magento stores that are published each day. If you are with Magento for a longer time, you will also notice that many of those look similar to default or modern Magento theme. Creating an totally unique and custom one can be a difficult process, easpecially taking into consideration number of different interfaces we have. This is why many Magento developers choose to use the CSS from one of mendioned Magento themes that come with default installation and style those up. This is not a bad choice at all as it speeds up the process and those default themes are very good. But, for those of you who wish to make an extra effort, we suggest that you to take a look at Magento Blank Theme for a head start. Before you get to this point, be sure to read Magento Designer’s Guide, where the Magento design terminology is explained in this PDF document. Blank Theme is a sample skeleton theme for Magento designer and a perfect way to start a new one. Let’s be honest, we will rarely want to develop a totally new layout. We wish the header on the top, footer on the bottom. We wish to have 1, 2 or 3 There are 4 comments columns, we wish to have boxes. Blank Theme does just that: provides a layout, but without any heavy styling. This makes it excellent base ground for a new Magento project. It doesn’t Affiliates for all – Magento integration come with default installation, so you will have to use Magento Recently one of our clients needed and info on Affiliate module Connect to get it. for Magento. When it comes to Magento, word “module” is http://www.magentocommerce.com/extension/518/blank- loosely related. Sure, every module needs config files in order theme to report it’s “connection” to Magento core. Modules like this,
Created using zinepal.com. Go online to create your own zines or read what others have already published. 13 September 8th, 2009 Published by: inchoo Magento community member Ross gave a good review comment: Create a Color Switcher in Magento This is a great theme to use for wire-framing or as a base Magento comes packed with a lot of options. But no matter for developing a custom theme! It looks like a lot of work has how many options you put into some product you can never gone in to slimming down the HTML and CSS, which makes cover all of them. One of such options (for now) is a color it much easier to work with compared to the default theme. switcher in Magento. To be more precise, an image switcher I particularly appreciate the well structured and commented based on color selection. CSS. The only things I would want different at this stage is Recently I’ve made a screencast on my site on this subject, for the ‘callouts’ to be taken out (and removal of associated with somewhat different title. The idea is to have a dropdown media images), and for this theme to be included in the main box from which you choose a color and based on the color Magento download (I would even like it to be the ‘default’). 5 selection product image changes. All of this is to be based on stars from me! some simple javascript (in my case, jQuery). Take a sneak peak of how does product info page looks line Before we continue, you might want to see color switcher in with no styling, but in finished layout. I’m sure that the CSS action. We used this solution on our Kapitol Reef project. wizards will find this invaluable. First you need to upload some images to your product and give them some meaningful names like Red, Blue, Green depending on your product color. When I say give them name, I mean on label values. Same goes for creating custom attribute. You create a dropdown selection box and create the same amount of dropdown options as you have images, giving them the same name Red, Green, Blue… and so on. Here are some images for you to see what I’m talking about:
There are 11 comments
Magento product view page analysis | Inchoo One of the most edited file in Magento is the template file View.phtml file. Reason for this is that a lot of clients would like to rearrange it differently on their online stores. Here is the analysis of that file and the list of all the methods it uses. One thing to keep in mind, this document shows you the View.phtml block file and shows you it’s inherited methods. All of the Magento block files have the similar inheritance principle. Therefore to find out the available methods all you need to do is open up the extended (inherited) classes. If you are using some smart IDE solution like NetBeans 6.5 with PHP code completion support, you can simply do the Mage_Catalog_Block_Product_View-> and press the Ctrl + Space to get the dropdown list of all the available methods. If that’s not the case, then you will how to do the things the manual way.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 14 September 8th, 2009 Published by: inchoo After this is done we go to the code part. There are three things After some additional styling you can get some impressive you need to do here. results for this. Hope you find it useful. Upload the jQuery and save it into the /js/jquery/jquery.js. You can see complete screencast at: One important note on jQuery; for some reason I had to use http://activecodeline.com/wp-content/uploads/videos/ jQuery 1.2.3 to get this example working. Latest version 1.2.6 MagentoProductColorChooser.swf (as of time of this writing) did not work. You can see the exact error it gave me on my screencast. There are 28 comments Now you need to modify /template/page/html/head.phtml file to include the jQuery script (or any other if you can code the same logic into it) and write down few lines of JS to Magento’s Onepage Checkout in a do the switching (you can download my version of file here head.phtml) nutshell And finaly, you need to modify the /template/catalog/ For the last two days I’ve been working on a custom checkout product/view/media.phtml file to grab all of the product page for one of our clients. Basicaly a page can be shown images and dump them into some div. Here is my sample in Magento using simple Core_Template type. Basically all (media.phtml) so just copy paste the code. code is set inside the .phtml file so it can be shown on every possible page or block, meaning it’s object independent, no And some additional screenshots for you to see final result inheritance. Something you can call from with your layout files like To complete my work, I had two mayor requirements. One was to manage my way around programmable adding a simple products to cart, plus their quantity and other was to do checkout with items in cart. Checkout was to be made with predefined payment method as well as shipping method. After reviewing a lot of Magento’s code involved in checkout process and process of adding products to cart and so on I’ve put together what I see as the most short example one can use to do a checkout with such predefined conditions. If you have such special requirements for your site below is the code that you can place on whatever file you wish and include it yout tempalte as block type core/template. Where ubmitCustomCheckout is the name of the submit button or submit input field. To extract addresses you can use something like
Magento official documentation download We were among a few of the studios to receive the early release of the Magento documentation before it’s official release date. We broke the embargo ’cause we just didn’t have the heart to keep it to our selves, we all now how painful it is to work without it.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 15 September 8th, 2009 Published by: inchoo Designer's Guide to Magento PDF There are 4 comments download | Inchoo Magento Installation with SVN or Wget After many developed CRE Loaded’s online stores and watching Magento development progress for quite some time, Unix command | Inchoo I decided it was time to use Magento with my next client. My Those of you who know what SVN is, feel free to skip this starting point for development was official Designer’s guide. article. Those of you who are not familiar with SVN, this is I’m the type of guy who likes to have documents nice&clean, a must-read. If you use standard FTP to upload all Magento so I tried to print it but print was a mess. That’s when I decided files, you may find this process very time consuming. Magento to create PDF of the official documentation for easy print. This 1.1.8 has over 6.700 files in over 2.200 folders. FTPing can is probably the best starting tutorial for creating a fresh new sometimes take few hours on some servers. Let’s look at Magento template. alternatives. I plan to write a short related tutorials in the days of 1st Both alternatives require SSH access to the server. I’m aware Magento development project, so I invite you to subscribe to that some low quality webhosting providers do not provide RSS if you wish to be posted. you with SSH info immediately. If you don’t have SSH info, ask webhosting support. If they don’t give it to you, change webhosting provider. Make it a rule, you’ll make your life Custom admin theme in Magento much easier. As mentioned on Magento forums the easiest way to achieve Get yourself familiar with basic UNIX commands first. this is with overriding adminhtml config with your local custom one and activate it as module. Alternative 1: SVN This is just a small example of different approach with Admin In the Downloads tab on Magento website, you will notice SVN Theme config option in admin panel, to show you how things page link: can be done in different ways in Magento. http://www.magentocommerce.com/svn Follow directory structure, copy files to their place and you will You can see how short this page is. You have 2 commands notice new “Admin Theme” option in System->Configuration- you can run at SVN. You can chack latest work in progress or >General->Design (Default Config scope). Your theme goes you can checkout latest stable version. If you are starting to in app/design/adminhtml/default/yourthemename folder. It develop a real project, you will probably want a stable version. doesn’t need to be whole theme of course, just the files you’re changing. Let’s look at the original command: svn checkout http://svn.magentocommerce.com/ source/branches/1.1 Disabling wishlist functionality This is probably not the exact command you wish to run on If like many of the Magento store owners you find that some of the server. It will place the files in trunk folder. I will assume the built-in features are not useful to you or to your customers two things: you can always disable them via the admin interface buy disabling their respective modules. 1. You will want the clean code Wishlist is not one of them. 2. You will want to specify the folder where you wish Magento to be installed To remove all of the traces of the wishlist functionality you need to do the following: If those are correct assumptions, you will want to run a 1. Go to the Admin interface (select the appropriate scope) command similar to this one: and under System -> Configuration -> Customers -> Whishlist svn export --force http:// select “No” under the “Enabled” in the General options. svn.magentocommerce.com/source/branches/1.1 shop This will remove all of the whishlist links in the magento blocks as well as the whishlist itself. • svn – This is the command 2. Just to make things perfect you should • export - The difference with checkout is that with an check the (yourskinname)/template/catalog/product/view/ export, you get a clean copy of the code, and none of addto.phtml and remove the “pipe” character from that file so the subversion metadata, so it can’t be used to svn up or that it doesn’t disturb the looks of your site make further changes. 3. Finally, since you do not need Whishlist anymore it is wise to • –force – you will overwrite all of the folders and files if disable it’s respective module output thru the admin interface they exist (Go to: System -> Configuration ->Advanced->Advanced and http://svn.magentocommerce.com/source/ set disable “Mage_Whishlist” ) • branches/1.1 - this is SVN URL. Leave it That’s it. Your whish is Magento’s command. intact.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 16 September 8th, 2009 Published by: inchoo • shop - the name of the folder you wish to place the files After you’re done with setting your new templates save the into. You may set the folders name to your likings. configuration by clicking on the “Save config”.
Read more about SVN at Wikipedia SVN Page and Subversion That’s it. Wise thing to do now would be to check how the official site. emails look when received so make a test purchase to verify everything is the way it should be. Alternative 2: Installing via wget There are 3 comments I will not be very descriptive here. This alternative is very well explained on Magento website in Wiki section: http://www.magentocommerce.com/wiki/groups/227/ Bestseller products in Magento installing_magento_via_shell_ssh Bestseller or best selling product is one of the features people Both scenarios will only place files. You still need to run web tend to ask for when it comes to Magento™. based installer afterward. But, that is another story. There are multiple ways to implement this feature. There are 6 comments In this example, I’m not using controller or model directories at all; I’m going to show you how to implement this feature using only one file: the View. Custom Transactional Emails Since transactional emails are very important for the process Basically, what you need to do is to create the directory inside of online shopping you need to have them set up just the you your template directory and place the bestseller.phtml file in want them and the default templates just don’t cut it. You it. In my example, I’m using the custom-created directory / need your own logo, email data and custom verbiage to be inchoo. All of the screenshots provided here are based on that consistent with the image of your company. directory structure. Here how it’s done : Adding this feature to your store is a matter of two simple steps: 1. Creating custom transactional e-mails via Admin a) In the admin panel of your magento installation go to: • copy bestseller-phtml file to your directory System->Transactional Emails • display the block on home page You’ll be presented with a list of default emails. You’ll need To add a block to a home page, you simply log into the to create a custom email so the only way to avoid writing our Magento, CMS > Manage Pages > Home. Then add the custom templates from scratch is to use the existing code of following to the content area: the template. Hint: If you want to see the template before copying, first click {{block type=”core/template” template=”inchoo/ on the “Preview” button on the right. bestseller.phtml”}} b) To create the new template click on the “Add new template” Notice the type attribute. I used core/template which means above the “Transactional Emails” list. This is the part where you can place this code anywhere in your site and it will work. Magento helps you with the option to load a deafult template Code does not inherit any collection objects from controllers for you to customize. Nice feature indeed. since it has none. All that is necessary for the bestseller.phtml to work is defined in that single file. Once you have loaded the deafult template give it a unique name under the “Template name” input field by adding a prefix of your own but leaving the deafult name as well. Example: ” mysite :: New account “. That way you can easily spot them in the long list of default and custom emails. Afterwards you can easily customize the verbiage and styling within the “Template subject” and “Template content”. The “Template content” is the body of the message that the user will recieve upon transaction so be sure to change the E- mail, name of the company etc. You’ll need to upload the logo of your company in the images folder of the skin you’re using. Once you are done with editing, save the changes and repeat the process for the rest of the email templates. 2. Assigning the templates to different stores and storeviews Assigning is the easiest part. Just go to the System One more thing: If you study the code in bestseller.phtml file > Configuration > Sales > Sales Emails and select the you will see, at the very top of the file, the part that says: $this- corresponding template minding the configuration scope. >show_total.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 17 September 8th, 2009 Published by: inchoo If I were to write • Support for Downloadable Products. (to see this new {{block type=”core/template” show_total=”12″ product type in action visit the Magento Demo Store. We template=”inchoo/bestseller.phtml”}} added an example of an MP3 product and an eBook ) in my home page, then $this would be assigned property • Added Layered Navigation to site search result page, show_total with a value of 12. with control on the attribute level to include or exclude attributes used on the search results page. • Improved site search to utilize MySQL fulltext search • Added support for fixed-taxes on product level for such taxes as “State Environmental Fee” in the USA and “WEEE/DEEE” in the EU. • Upgraded Zend Framework to the latest stable version 1.7.2 • Added a Layered Navigation Cache for improved performance of large catalogs (currently in beta and is NOT recommended for production use).
If you need to upgrade existing Magento version through the Magento Connect Manager to 1.2.0.1, follow this steps:
• Do NOT use your live or production site. We suggest Therefore, the provided bestseller.phtml file provides the making a copy of your site and upgrading that copy first. option of setting the number of products you wish to see listed. • Backup your index.php and .htaccess files (if modified) Here is the bestseller.phtml packed in bestseller.zip. • Log into your Magento Connect Manager. Hope you find this useful. • Select the ‘Setting’ tab. There are 20 comments • Change the Preferred State to ‘Stable’, and save settings. • For the Mage_All_Latest package select upgrade. Magento 1.2. is out with downloadable • Click on the ‘Commit Changes’ button. The upgrade products | Inchoo should start. Just at the dawn of 2008, Varien launched a new version • After upgrade is complete click on the ‘Refresh’ button. of Magento: 1.2. Upgrading previous Magento versions was • Copy your original index.php and .htaccess files back (if sometimes not an easy task since Varien used to change needed) standard function names which caused themes to break. We backup the site, made a copy, took a deep breath, expected the • Log into your admin and rebuild search index worse, and… Nothing The upgrade went smoothly. Wow, • You should now have Magento 1.2.0 installed. that felt good. Happy Magentizing We were joking at the company today. Zeljko: You know what’s easy in Magento? There are 1 comments Branko: There is nothing easy in Magento! Zeljko is an front end interface developer, while Branko is Listing out products on sale in Magento | a programmer. Although creating Magento theme is a clear process if you follow designer’s guide, programming is much Inchoo more complex. Before this version, Magento upgrades used to One of my recent articles was on the subject of sorting “On cause troubles. Hope this is over. Sale” product in Magento. The following is a cleaner and more There is always a good practice NOT to update platform to advanced look at how—with few tricks and smart moves—you latest version immediately. Even in this case this proved to can reuse existing Magento code and modify it to suit your be valid. Two days after version 1.2. came version 1.2.0.1. that needs. fixed some flaws. Keep this in mind when you wish to upgrade Product can be “on sale” in two ways: to newest version of the platform immediately after it appears. 1. when an item has a special price assigned to it on the individual level, or New version sorts some issues from Magento 1.1.x versions 2. when a special promotion “covers” the item and brings some highly requested features such as: It is important to remember that you don’t have to set up the special price on each product to get it to be on sale; you can
Created using zinepal.com. Go online to create your own zines or read what others have already published. 18 September 8th, 2009 Published by: inchoo simply create a promotion rule and say something like “Set all the products in Category X to be on sale.” I provided few screenshots at the bottom of this article to provide a closer look at what I’m talking about. I will not go into too much details here since this is a bit more advanced HOW TO, but here is the process in a nutshell: First, create a copy of /catalog/product/list.phtml file and name it onsale_list.phtml. Here is my version of onsale_list.phtml file. Second, “activate” this new file. There are few ways you can do this. Let’s say you wish to assign this onsale_list.phtml on one of our categories, named “On Sale,” for instance. We then go to Categories > Manage Categories > On Sale… select Custom design and under Custom layout update, place the following: product_list_toolbar If you now go to your category On Sale, it should only show products you have assigned to category “On sale” that have a special price set to them. If you now wish to apply Promotion rules to entire “On sale” category, then you simply assign a rule to one item, and all the items assigned to the same “On sale” category (covered by promotion rules) will be automatically listed in the grid. Basically, the magic is in one simple IF statement < ?php if(($_product->special_price !== null) or ($_product- >_rule_price !== null)): ?> for each block that lists products. Check out the screenshots, they explain a lot.
Hope you find a way to try this out. Feel free to provide some feedback or additional suggestions. There are 3 comments
Magento After many weeks of work, our 1st Magento project hit the Web: TeraFlex Suspensions. As the purpose of the site
Created using zinepal.com. Go online to create your own zines or read what others have already published. 19 September 8th, 2009 Published by: inchoo in not primarily selling, but also branding and community development, we decided to use Wordpress and Magento combination to accomplish the client’s goals.
I know that this is not some breakthrough article, but I will certanly create contact CMS page on all of my future Magento projects.
The Magento portion is visible at http://www.teraflex.biz/ products/. We created an original and custom theme from Custom price filter in Magento scratch since we did not want it to look like the default one or to Quite a few people have asked me for a price filter functionality have a feel similar to the default one. It was not an easy task as that comes with Magento. Mostly, the questions are same: the learning curve for Magento template system is quite steep How does one put the price filter anywhere on the page? How compared to other solutions. However, it is worth the time. does one set it’s on price ranges in that filter? What defines We added featured products to products page, the lightbox to default price ranges. Is it possible to set price filter for all my products info page, and numerous styles that made this store products instead of just single category? Lot of questions. The quite unique. answer might be simpler then you might think. Wordpress There are two ways to approach this problem. Head trough wall or stop and think approach.Default Magento price filter All the menu elements outside Products tab are run by works with algoritam which functions on the following logic Wordpress. We have stuff like: All of these elements turn Wordpress into a feature-rich CMS 1. Find the lowest and highest price in the range of filtered suitable for larger projects. products. How do you like the new site? Feel free to post a comment. 2. Find what power of 10 these are in. 3. If there’s 2 or less ranges available we go one power There are 4 comments down.
So one approach would to be to somehow override default Place Contact form in CMS Page in price filter logic by rewriting it and embedding some new logic Magento | Inchoo of yours. I call this one head trough wall. I’m not implying that this is wrong approach, on the contrary this is the generic As you know, Magento has a built-in contact form that can solution. However it does require some more time to come up be used for general contacts. That form isn’t part of any CMS with. page, you cannot edit some introduction text, you cannot add phone numbers administration, and you cannot see the Second solution is by far more easier. It involves using simple breadcrumbs. If you wish to edit text in that default contact HTML (could use it in your static blocks). form, you will need to update front-end files. Luckily, there is If one wishes to use the price range filter to filter trough entire an alternative. product collection he can simply create a subcategory under If you are a developer, editing your contact form HTML is an the Default root category and add all of the products to it. Then easy task. You only need to open file: we write some static html code with urls made to fire up the app/design/frontend/default/[yourtheme]/template/ price filter. contacts/form.phtml and you will find your way around. Let’s look at the default Magento sample data. It gies you the However, there are cases when you would like to give your following category layout client an option to edit some intro text, edit his phone Root Catalog (6) numbers, edit text behind the form, etc. You are probably guessing that it would be nice to be able to embed contact form • Furniture (6) in some CMS page. No problem. • Living Room (4) Created using zinepal.com. Go online to create your own zines or read what others have already published. 20 September 8th, 2009 Published by: inchoo • Bed Room (4) Most of this is quite selfexplanaory so, for those who need this kind of functionality across some special pages, hope you Notice the url link above… It wont work if you put it like http:// integrate it withouth any problems. somesite.domain/furniture/living-room/?price=1%2C199 There are 4 comments It wont work like that because by default you do not have price filter functionality covering second subcategory level. What this means is that following link wont work Magentique - Magento Showcase http://somesite.domain/furniture/living-room/? price=1%2C199 Launched | Inchoo Since the first subcategory level is Furniture, and second are We launched one internal project today: magentique.com. For Living Room and Bed Room, by default the following url will the last few months we were working almost exlusively on work with or withoutindex.php. Magento projects. As many of you, we were also wondering what sites are developed with it. There are very little galleries • url: http://somesite.domain/furniture/? that give the list of Magento powered stores and that’s how price=1%2C199 this idea was created. We present you Magentique and hope • url: http://somesite.domain/index.php/furniture/? you like it. price=1%2C199 Curiosity about this project is that we used Magento to develop it. You’ll not see a shopping cart or Add to Cart buttons, but You could therefore create simple HTML like Magento was the tool we used. Take a look at the gallery,
And put it into some of the static block. Notice the links in above HTML code. The /all part of the url is the url key of the Hi, All category in which we added all of our products. I like your work with Magento, and i see that y’re not Last, but not least is understanding of the “price=…” affraid of experimenting. My question is relative to http:// parametar. www.raspberrykids.com. I like the layout, especially folder tab with ‘Description’, ‘Tags’ etc. I didnt find such a feature in 1%2C10000 – where 1 stands for first range of 10000 (last Magento. Can you explain it on Inchoo web (in some article), number) of course, only when it isnt company secret ) Thankx. Have or a nice day. 2%2C10000 – where 2 stands for second ranfge of 10000, Online stores on magentique.com are not only our works. (first would be 0-10000). Magentique is the gallery that lists all Magento sites and not only our portfolio. So if we were to write something like 3%2C10 it would be the price range from 20-30, where 3 Regarding blog topics, we try to write about the things we work stands for third range of tens (number 10). Firs is from 0-10, on. However, we can not cover all Magento possibilities. Hope second 10-20, third 20-30. you agree.
Created using zinepal.com. Go online to create your own zines or read what others have already published. 21 September 8th, 2009 Published by: inchoo
Can an online store have only one product? Sure it can and
we give you the one that just launched. Kapitol Reef was founded to develop, perfect, manufacture and market a new breed of snorkels based upon pressure-balanced breathing in
the aquatic environment. The entire focus for this company is to deliver best-of-class products, starting with the snorkel. Kapitol Reef is in the market for many years and this week they published a new site. Similar to our work on Teraflex < ?php /* END OF my-custom-form */?> project, we used Wordpress and Magento platforms for the development. different product prices and different payment options. Magento seemed like a great solution for such a request, You will notice all of the input fields have one common although the initial concern was if it might be an overkill class name, required-entry. I’m not gonna go over all of the considering the fact we only have one product to start with? available class names here. To find available class names, try When the development started to roll out, the concern was no going to One page checkout page, where you have checkout more. This will work superbly. We give you the new Magento form, then simply view source and look for class names next store that uses a combination of Wordpress and Magento. to input, radio select and other fields. Magento portion of the site is visible from the Online Store tab. Most important thing besides assigning class names is that little piece of JavaScript below the form. Remember to pass form id into the new VarienForm object. Basically thats it. Constructing the form this way, automaticaly makes your form reuse already existing validation code, the one that the rest of the shop is using. There are 5 comments
CSRF Attack Prevention If you login to your Magento admin today, you are welcomed with message box that says: CSRF Attack Prevention Read details ! Yesterday Magento team acknowledged CSRF vulnerability and provided solution in a form of tutorial to change admin path (frontName) of your Magento shop. I find this approach strange and funny at the same time. Is hiding vulnerability new way of fixing it? Especially since You may also notice a styled color switcher feature we some users of French Magento forums found similar problem developed for this project. As this product comes in various in downloader (Magento connect manager). I can confirm this colors, we decided to spice up the product info page and style couse i tested it myself. The most funny part was that Magento the color choosing to replace the default select box. cached my get request so i couldn’t get rid of my test alert box There are 7 comments Few fast tips for Magento admins: Form Validation in Magento | Inchoo 1. Follow official Magento news, forums, updates. One of the coolest things in Magento is a form validation, and 2. Don’t click suspicious links. These kind of attacks are the way how it’s done. Magento uses Prototype library (which, usually done through malformed links that admin clicks personlay, I’m not a big fan of) to manage form validation. All through mail, comment, or any other source. you need to do when writing custom form is to assign a valid 3. Clear “saved passwords” from browsers. Since most class names to your input fields. Here is an example of how web browsers offer to remember passwords, and then your custom form might look in order to get use of automatic autocomplete them, these kind of attack could easily stole your form validation. password.